package com.ninong.ker.workflow.rest;


import com.ninong.ker.admin.service.ActivitiHistoryService;
import com.ninong.ker.admin.service.dto.ActivitiHighLineDTO;
import com.ninong.ker.common.response.CmdResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;


/**
 * @author jmz
 */
@RestController
@RequestMapping("cmd/v1/history")
public class ActivitiHistoryController {

    @Autowired
    private ActivitiHistoryService activitiHistoryService;

    /**
     * 流程图高亮
     * @param instanceId
     * @return
     */
    @GetMapping("/{instanceId}")
    public ResponseEntity<CmdResponse> gethighLine(@PathVariable String instanceId) {
        ActivitiHighLineDTO activitiHighLineDTO = activitiHistoryService.gethighLine(instanceId);
        CmdResponse response = new CmdResponse();
        response.setData(activitiHighLineDTO);
        return ResponseEntity.ok(response);
    }
}
